package ansi.servlet.pago_de_cuotas;

import java.io.IOException;
import java.util.Collection;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import ansi.modelo.Cuotas;
import ansi.modelo.Pago_Cuota;
import ansi.negocio.GestionCuotas;
import ansi.negocio.GestionPago_Cuota;

/**
 * Servlet implementation class BuscarPagoDeCuotaServlet
 */
@WebServlet("/BuscarPagoDeCuotaServlet")
public class BuscarPagoDeCuotaServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;

    /**
     * Default constructor. 
     */
    public BuscarPagoDeCuotaServlet() {
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
	}
	protected void buscar(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		try {
			Collection<Pago_Cuota> list	= null;
			GestionPago_Cuota gestionPago_Cuota		= new GestionPago_Cuota();
			list	= gestionPago_Cuota.listar();
			request.setAttribute("pago_cuotaList", list);
			RequestDispatcher rd = request.getRequestDispatcher("pago_cuota_buscar.jsp");
			rd.forward(request, response);
		} catch(Exception ex) {
			ex.printStackTrace();
		}
	}
}
